package gui.swing;

import javax.swing.*;
import java.awt.*;

public class MoreChoose extends JFrame {
    public MoreChoose(){
        Container contentPane = this.getContentPane();
        //将一个图片变为图标
        String url = "E:\\new PC\\study\\java学习\\code\\JavaSE\\基础语法\\src\\gui\\swing\\zsh.jpg";

        Icon icon = new ImageIcon(url);

        //多选框
        JCheckBox jCheckBox1 = new JCheckBox("jCheckBox1");
        JCheckBox jCheckBox2 = new JCheckBox("jCheckBox2");
        JCheckBox jCheckBox3 = new JCheckBox("jCheckBox3");

        contentPane.add(jCheckBox1,BorderLayout.NORTH);
        contentPane.add(jCheckBox2,BorderLayout.CENTER);
        contentPane.add(jCheckBox3,BorderLayout.SOUTH);

        this.setVisible(true);
        this.setBounds(100,100,200,200);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        new MoreChoose();
    }
}
